//
//  HMTeacgerEvaluateDetailGoodCell.m
//  BestLearning
//
//  Created by 陈辉明 on 2017/12/11.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "HMTeacgerEvaluateDetailGoodCell.h"

@interface HMTeacgerEvaluateDetailGoodCell()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *levLabel;
@property (weak, nonatomic) IBOutlet UIImageView *oneStar;
@property (weak, nonatomic) IBOutlet UIImageView *twoStar;
@property (weak, nonatomic) IBOutlet UIImageView *threeStar;
@property (weak, nonatomic) IBOutlet UIImageView *fourStar;




@end

@implementation HMTeacgerEvaluateDetailGoodCell

-(void)setOneDict:(NSDictionary *)oneDict {
    _oneDict = oneDict;
    self.titleLabel.text = oneDict[@"content"];
    
    if ([NSString isBlankString:[NSString stringWithFormat:@"%@",oneDict[@"selection"]]]) {// 根据这个加载星星个数和优良中差字体的显示
        
    }else {
        NSString *selection = [NSString stringWithFormat:@"%@",oneDict[@"selection"]];
        if ([selection isEqualToString:@"1"]) {
            self.levLabel.text = @"优";
            self.oneStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.twoStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.threeStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.fourStar.image = [UIImage imageNamed:@"icon_star_default"];
        }
        if ([selection isEqualToString:@"2"]) {
            self.levLabel.text = @"良";
            self.oneStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.twoStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.threeStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.fourStar.image = nil;
            
        }
        if ([selection isEqualToString:@"3"]) {
            self.levLabel.text = @"中";
            self.oneStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.twoStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.threeStar.image= nil;
            self.fourStar.image = nil;
        }
        if ([selection isEqualToString:@"4"]) {
            self.levLabel.text = @"差";
            self.oneStar.image = [UIImage imageNamed:@"icon_star_default"];
            self.twoStar.image = nil;
            self.threeStar.image= nil;
            self.fourStar.image = nil;
        }
        
        
    }
    
}



@end
